import React from 'react';
import { Button, Checkbox, Form, Input } from 'antd';


const login = (props) => {
  const onFinish = values => {
    localStorage.setItem('token',values.username)
    props.history.push('/admin/home')
  console.log('Success:', values);
};
return   <Form

    onFinish={onFinish}

  >
    <Form.Item
      label="Username"
      name="username"
      rules={[{ required: true, message: 'Please input your username!' }]}
    >
      <Input />
    </Form.Item>

    <Form.Item
      label="Password"
      name="password"
      rules={[{ required: true, message: 'Please input your password!' }]}
    >
      <Input.Password />
    </Form.Item>



    <Form.Item label={null}>
      <Button type="primary" htmlType="submit">
        Submit
      </Button>
    </Form.Item>
  </Form>
};
export default login;